Skip to content

Conversation

@Dwij1704
Copy link
Member

@Dwij1704 Dwij1704 commented Apr 9, 2025

📥 Pull Request

📘 Description
Closes #913
Add system stats and imported libraries tracking

  • Introduced get_system_stats function to collect CPU and memory information.
  • Added get_imported_libraries function to retrieve top-level imported libraries.
  • Updated setup_telemetry to include system stats and imported libraries in resource attributes.
  • Expanded ResourceAttributes class to define new attributes for system and library information.

Note: "os.type": "linux" is default behaviour of OTEL.

🧪 Testing

  "resource_attributes": {
    "ProjectId": "6952a1d4-8a47-4c8b-98c5-1d03813ae5ad",
    "agentops.project.id": "6952a1d4-8a47-4c8b-98c5-1d03813ae5ad",
    "cpu.count": "16",
    "cpu.percent": "11",
    "host.machine": "AMD64",
    "host.name": "fd7ce180eb77",
    "host.node": "DESKTOP-ADFQBKV",
    "host.os_release": "10",
    "host.processor": "Intel64 Family 6 Model 154 Stepping 3, GenuineIntel",
    "host.system": "Windows",
    "host.version": "10.0.26100",
    "imported_libraries": "[\"agentops\",\"anthropic\",\"haystack\",\"litellm\",\"agents\",\"opentelemetry\"]",
    "memory.available": "3540471808",
    "memory.percent": "79",
    "memory.total": "16849293312",
    "memory.used": "13308821504",
    "os.type": "linux",
    "service.name": "agentops"
  },

@codecov
Copy link

codecov bot commented Apr 9, 2025

Codecov Report

Attention: Patch coverage is 38.46154% with 32 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
agentops/sdk/core.py 15.78% 32 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@bboynton97 bboynton97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huge

@bboynton97 bboynton97 merged commit e01e162 into main Apr 11, 2025
7 of 10 checks passed
@bboynton97 bboynton97 deleted the Add-system-stats-and-imported-libraries-tracking branch April 11, 2025 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add system stats and imported libraries tracking

3 participants